﻿@using Apps.Web.Core;
@using Apps.Common;
@using Apps.Models.Sys;
@using Apps.Locale;
@{
    ViewBag.Title = "起草申请";
    Layout = "~/Views/Shared/_Index_Layout.cshtml";
}
<div id="modalwindow" class="easyui-window" style="width:800px; height:400px;" data-options="modal:true,closed:true,minimizable:false,shadow:false"></div>
<div style="padding:10px;">
@foreach (var v in (List<Apps.Models.Flow.Flow_TypeModel>)ViewBag.DrafList)
{
    <fieldset class="accordion" style="margin: 0px; padding: 0px; padding-bottom:10px; margin-bottom: 10px;">
        <legend class="tabs-header panel-title" style="border: 0px; padding: 5px; margin: 20px; margin-bottom:5px;">@v.Name</legend>
        <div style="padding-left:20px;color:#808080">备注：@v.Remark</div>
        <div style="padding: 0px 20px 40px 20px;">
            
            @foreach (var r in v.formList)
            {
                
                <div style="float: left; width: 120px; margin:10px 0px 10px 0px;">
                    <a href="javascript:void(0)" class="easyui-linkbutton" data-options="plain:true,iconCls:'fa fa-file-text-o'" onclick="CreateFormContent('@r.Name',@(r.IsExternal?"'/Flow/Draf/CreateExternal?id="+r.Id+"'":"'/Flow/Draf/Create?id="+r.Id+"'"),'fa fa-file-text-o')">@r.Name</a>
                </div>
          
            }
        </div>
    </fieldset>
}
    </div>
<script type="text/javascript">
    function CreateFormContent(winTitle,url)
    {
        $("#modalwindow").html("<iframe width='100%' height='100%' scrolling='auto' frameborder='0'' src='" + url + "'></iframe>");
        $("#modalwindow").window({ title: winTitle, width: SetGridWidthSub(60), height: SetGridHeightSub(60), iconCls: 'fa fa-file-text-o' }).window('open');
    }
    //ifram 返回
    function frameReturnByClose() {-
        $("#modalwindow").window('close');
    }
    function frameReturnByMes(mes) {
        $.messageBox5s(Lang.Tip, mes);
    }
</script>